package com.sloth.service;

import com.sloth.pojo.Image;
import com.sloth.pojo.Myorder;
import com.sloth.util.ServerResponse;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import java.util.Map;

/**
 * @author lai
 * @time 2021/10/10 14:50
 */
public interface MyOrderService {

    // 新增订单、订单详情，在一个方法中生成
    public void saveMyOrderAndOrderDetails(Myorder myorder, Map<Integer,Integer> proIdCount);

    // 根据订单编号、用户id，查找订单，返回下单页面，用于调用支付宝时向支付宝发送订单id，在AliPayController中根据订单id查询其他信息
    public Integer getMyOrderIdByMyOrderNoAndCustomerId(Long orderNo,Integer customerId);

    // 巴用鑫 我的订单页面
    //查询全部订单
    public ServerResponse getByCustomerIdAndOrder(Integer customerId , Integer state);

    // 根据订单编号查询订单信息
    public Myorder getByMyOrderNO(Long myOrderNO);
    //修改订单状态
    public ServerResponse update(Integer myOrderId);

    //确认收货
    public ServerResponse updatedicision(Integer odDetailsId);

    // 修改订单(修改已支付）
    public Integer updateMyOrderStatue(Myorder myorder);

    // 根据订单id 查询订单信息
    public Myorder getMyOrderByMyOrderID(Integer myOrderId);

}